Re: Code problem: Form will only work under GET method
am 20.11.2007 12:04:17 von bruno_guedesavOn 19 nov, 16:38, "Rik Wasmus" AVISO: seu coment=E1rio pode ser enviado para Coment=E1rio: Responda a esta simples pergunta:
> On Mon, 19 Nov 2007 19:29:38 +0100, bruno_guedesav
>
>
>
>
> > This has ocurred before, but if the person had find a way to solve it
> > or not, I've got no clue. So, here I am to ask for help.
>
> > I've created a form via pure PHP, basically a bunch of prints together
> > making a form. But somthing strange goes on: the form will only pass
> > it's fields forward under method GET, but not on POST.
>
> > Here's a snippet of code, just the basics:
>
> > print "
> > comment.php\" method=3D\"POST\">\n";
> > print "Nome:
=
> >> ";
> > print "Email(obrigat=F3rio; n=E3o ser=E1 publicado):
"text
> > \" name=3D\"email\" size=3D\"64\" />
";
> > print "Site:
<=
br /
> >> ";
> > (...)
> > print "\n";
>
> I'm not going to check that quote-escape festival just yet. Try to
> validate the page it creates with the w3c HTML validator, most likely you =
> error will show up there.
>
> If after that it still doesn't work/there are no errors, what form does
> your code actually output, and how does your webserver log the request?
The HTML validator goes fussy on some input tag it claims it's closed
but not opened, when it clearily is. Here's the HTML output of the
form:
PbBlog/pages/comment.php" method=3D"POST">
moderação caso:
a) n=E3o contenha um nome de autor;
b) contenha material impr=F3prio;
c) seja, possivelmente, spam;
Caso seu coment=E1rio n=E3o seja spam, mas sim um coment=E1rio leg=EDtim=
o,
aguarde algumas horas e a justi=E7a ser=E1 feita. Obrigado pela
paci=EAncia.
>
Email(obrigat=F3rio; n=E3o ser=E1 publicado):
"
name=3D"email" size=3D"64" />
Site:
l"
size=3D"64" />
name=3D"content">
www.dcc.ufmg.br/~guedesav/PbBlog/img/captcha225896485.png" />
value=3D"*908BE2B7EB7D7567F7FF98716850F59BA69AA9DB" />
Besides, as I said, the form works finely in GET method, but not in
POST. If it goes fine with GET, how come the problem is with the
syntax?